home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / H-I / HyperTalkHelp.cpt / HyperTalk Tutorial Sampler 1.1 / card_4519.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  73 lines

  1. -- card: 4519 from stack: in.1
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2619
  5. -- name: 
  6.  
  7.  
  8. -- part 2 (button)
  9. -- low flags: 00
  10. -- high flags: 0000
  11. -- rect: left=43 top=27 right=63 bottom=77
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 32462 / 32462
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: New Button
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   play "Boing" tempo 120 a
  23.   push card
  24.   visual zoom open
  25.   go to card id 80559 of stack "Help"
  26. end mouseUp
  27.  
  28.  
  29.  
  30. -- part contents for background part 10
  31. ----- text -----
  32. The "go" command will take you to another card in the current stack, or a card in another stack.  You can specify the card by it's name, it's number, or it's position in the stack.  The word "to" is optional.
  33.  
  34. After trying the Test Button, change the "go to" command to go to the first card in this stack.
  35.  
  36. Notice in this example that after you go to another card, you are returned back to this one.  This is done with two commands: "pop card" and "push card".  "Push card" works like a bookmark.  When ever you use it, it remembers what card and stack you are in.  Then you can go to another card (or another stack).  When you want to return, use "pop card" and it will return you to the last card that "push card" was used.  
  37.  
  38. Push and pop are useful in HyperCard applications which allow you to get to a card several ways.  Once you are in the card, you can get back to wherever you were by popping.
  39.  
  40. (The "set lockMessages to true/false" commands in the Script Window are needed for this tutorial.  You do not need them when writing your own scripts.)
  41.  
  42. Click ? to find out more about "Go".
  43.  
  44.  
  45. -- part contents for background part 6
  46. ----- text -----
  47. Go To
  48.  
  49. -- part contents for background part 9
  50. ----- text -----
  51. on mouseUp
  52. set lockMessages to true
  53. push card
  54.  
  55. go to prev card
  56.  
  57. pop card
  58. set lockMessages to false
  59. end mouseUp
  60.  
  61.  
  62. -- part contents for background part 13
  63. ----- text -----
  64. on mouseUp
  65. set lockMessages to true
  66. push card
  67.  
  68. go to prev card
  69.  
  70. pop card
  71. set lockMessages to false
  72. end mouseUp
  73.